<template>
	<view class="box">
		<view class="xiaohei fonweight" style="font-size:48rpx;">Hi，你的性别是?</view>
		<view class="xiaohui strongtext margin_top">只有一次选择性别的机会，我们会推荐你喜欢的内容</view>
		<view class="flexbetween" style="margin-top: 160rpx;">
			<view class="wushi flexcenter" @click="tzxqsr(0)">
				<view class="">
					<view class="tupian">
						<image src="../../static/image/system/nans.png" mode=""></image>
					</view>
					<view class="xiaohei titletext margin_top textcenter">男生</view>
				</view>
			</view>
			<view class="wushi flexcenter" @click="tzxqsr(1)">
				<view class="">
					<view class="tupian">
						<image src="../../static/image/system/vs.png" mode=""></image>
					</view>
					<view class="xiaohei titletext margin_top textcenter">女生</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {

			}
		},
		methods: {
			// 跳转选择生日
			tzxqsr(gender) {
				uni.showLoading({
					mask:true,
					title:"请稍后"
				})
				httpRequest.request('/api/user/profile', 'GET', {
					gender
				}).then(res => {
					uni.hideLoading()
					if(res.code==1){
						uni.navigateTo({
							url: '/pages/login/xuanzesr'
						})
					}else{
						httpRequest.toast(res.msg)
					}
				})
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.tupian {
		width: 250rpx;
		height: 250rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.box {
		padding: 229rpx 48rpx 30rpx;
	}
</style>